
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>我的购物车</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<style type="text/css">
h1 {
	clear: both;
	margin-left: 460px;
}

table {
	margin: 0px auto;
	width: 1024px;
}

table img {
	width: 100px;
	height: 100px;
	vertical-align: middle;
}

td {
	text-align: center;
}

th {
	line-height: 50px;
	background-color: #A52A2A;
	color: white;
}

#empty {
	margin: 0px 0px 0px 20%;
}

#submit {
	width: 100px;
	height: 40px;
	background-color: #A52A2A;
	border: 0px;
	color: white;
}
h3 a{
margin-left: 460px;
}
;
</style>
<script type="text/javascript" src="${request.Context}/js/jquery-1.8.3.js"></script>
<script type="text/javascript">
	$(document).ready(function(e) {
		$(".del").click(function() {
			return confirm("确定要删除吗？");
		});
		
		
	});
</script>

</head>

<body>

	<#include "header.ftl">
	<h1>我的购物车</h1><h3><a href="/cart/delAll">清空购物车</a></h3>
	
	
	
	<hr>
	<form action="/cart/dingdan" method="post">

		<#if list2??>
<<<<<<< HEAD
		<table>
=======
			<table>
>>>>>>> branch 'master' of https://gitee.com/jiawangyang/qiantai.git
				<tr>
					<th>商品编号</th>
					<th colspan="2">商品名称</th>
					<th>商品类型</th>
					<th>商品单价</th>
					<th>购买数量</th>
					<th>小计</th>
					<th>操作</th>
				</tr>
				
				
				<#list list2 as cart>
					<tr class="td">
						<td>${cart.getGid()}</td>
						<td><img src="${request.Context}/img/detail/${cart.getImg()}" /></td>
						<td>${cart.getName()}</td>
						<td>${cart.getType()}</td>
						<td>${cart.getPrice()}</td>
						<td><a href="/cart/jian?gid=${cart.getGid()}&type=${cart.getType()}">-</a>${cart.getNum()}<a href="/cart/jia?gid=${cart.getGid()}&type=${cart.getType()}">+</a></td>
						<td>${cart.getPrice()*cart.getNum()}</td>
						<td><a
							href="/cart/del?gid=${cart.getGid()}&type=${cart.getType()}"
							class="del">删除</a></td>
					</tr>
				</#list>
				<tr>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td>总计：</td>
					<td style="font-size: 24px; font-weight: bold; color: #D2691E;">${total}</td>
<<<<<<< HEAD
					<td colspan="2">					
					<#--  <input type="submit" value="结算" id="submit"<a href="/order/orderlist?oid=${o.getOid()}"></a>></td>-->
=======
					<td colspan="2"><input type="submit" value="提交订单" id="submit"></td>
>>>>>>> branch 'master' of https://gitee.com/jiawangyang/qiantai.git
				</tr>
			</table>
<<<<<<< HEAD
			
		<#else>
		
			<div id="empty">
				<a href="/good/index.ftl" ><img src="${request.Context}/img/che.jpg"></a>
			</div>
		<#/else>			
=======
		<#else>
		
			
>>>>>>> branch 'master' of https://gitee.com/jiawangyang/qiantai.git
			<div id="empty">
				<a href="/" ><img src="${request.Context}/img/che.jpg"></a>
			</div>
		</#if>
		
	</form>
	<div style="height: 190px"></div>

	<#include "footer.ftl">

</body>
</html>
